<?php

/**
 * PaymentChecks form base class.
 *
 * @method PaymentChecks getObject() Returns the current form's model object
 *
 * @package    erpcrm
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BasePaymentChecksForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'payment_iden'   => new sfWidgetFormInputHidden(),
      'check_iden'     => new sfWidgetFormInputHidden(),
      'bank_initials'  => new sfWidgetFormInputText(),
      'account_number' => new sfWidgetFormInputText(),
      'check_number'   => new sfWidgetFormInputText(),
      'check_date'     => new sfWidgetFormDate(),
      'check_amount'   => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'payment_iden'   => new sfValidatorPropelChoice(array('model' => 'Payment', 'column' => 'payment_iden', 'required' => false)),
      'check_iden'     => new sfValidatorPropelChoice(array('model' => 'PaymentChecks', 'column' => 'check_iden', 'required' => false)),
      'bank_initials'  => new sfValidatorString(array('max_length' => 6)),
      'account_number' => new sfValidatorString(array('max_length' => 20)),
      'check_number'   => new sfValidatorString(array('max_length' => 20)),
      'check_date'     => new sfValidatorDate(),
      'check_amount'   => new sfValidatorNumber(),
    ));

    $this->widgetSchema->setNameFormat('payment_checks[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'PaymentChecks';
  }


}
